package com.senven.address.controller.api;

import com.senven.address.AddressApp;
import com.senven.address.service.AddressService;
import com.senven.common.entity.Address;
import com.senven.common.pojo.vo.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @BelongsProject: senven-orderfood-parent
 * @BelongsPackage: com.senven.address.controller.api
 * @unthor : YSH
 * @date : 2022/9/7 18:59
 */
@RestController
@RequestMapping("/api/address")
public class ApiAddressController {

    @Autowired
    private AddressService addressService;

    @PostMapping("/findAllAddressByUserid")
    public List<Address> findAllAddress (@RequestParam String id){
        System.out.println(id);
        return addressService.findAllAddressByUserid(id);
    }


    /*@PostMapping("/findAllAddressByUserId")
    public List<Address> findAllAddressByUserId(@RequestParam String id){
        return addressService.findAllAddressByUserid(id);
    }*/

}
